{extend name="$lake_admin_layout"/}

{block name="main"}
<div class="layui-card">
    <div class="layui-card-header layui-bg-cyan">编辑导航</div>
    <div class="layui-card-body">
        <form class="layui-form" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">
                    上级导航
                    &nbsp;<font color="red">*</font>
                </label>
                <div class="layui-input-block w500">
                    <select name="parentid" lay-verify="required">
                        <option value="0">作为一级导航</option>
                        {volist name="parents" id="vo"}
                            <option value="{$vo.id}" {if $vo['id'] == $parentid}selected="selected"{/if}>{:htmlspecialchars_decode($vo['spacer'])} {$vo.title}</option>
                        {/volist}
                    </select>
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">如果选择上级分类，那么新增的分类则为被选择上级分类的子分类</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">
                    标题
                    &nbsp;<font color="red">*</font>
                </label>
                <div class="layui-input-block w500">
                    <input type="text" name="title" value="{$info.title}" lay-verify="required" autocomplete="off" placeholder="导航标题" class="layui-input">
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">导航中文名称</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">
                    链接地址
                    &nbsp;<font color="red">*</font>
                </label>
                <div class="layui-input-block w500">
                    <input type="text" name="url" value="{$info.url}" autocomplete="off" placeholder="链接地址" class="layui-input">
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">导航的链接地址</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">
                    跳转方式
                    &nbsp;<font color="red">*</font>
                </label>
                <div class="layui-input-block w500">
                    <select name="target" lay-verify="required">
                        <option value="_self" {if $info['target'] == '_self'}selected="selected"{/if}>当前页面</option>
                        <option value="_blank" {if $info['target'] == '_blank'}selected="selected"{/if}>跳出页面</option>
                    </select>
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">导航链接的跳转方式，目前为两种</div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">描述</label>
                <div class="layui-input-inline w500">
                    <textarea name="description" placeholder="导航的相关描述" class="layui-textarea">{$info.description}</textarea>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-block w500">
                    <input type="text" name="sort" value="{$info.sort}" autocomplete="off" placeholder="链接排序" class="layui-input">
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">导航的链接排序，值越小越前</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-block">
                    <input type="radio" name="status" value="1" title="正常" {if $info.status==1}checked{/if}>
                    <input type="radio" name="status" value="0" title="禁止" {if $info.status==0}checked{/if}>
                </div>
            </div>
            
            <input type="hidden" value="{$info.id}" name="id" />
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" lay-filter="formSubmit">立即提交</button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}